package com.example.software.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class MessageDTO {
    
    @NotNull(message = "接收者ID不能为空")
    private Long receiverId;
    
    @NotNull(message = "任务ID不能为空")
    private Long taskId;
    
    @NotBlank(message = "消息内容不能为空")
    private String content;

    // 用于调试的toString方法
    @Override
    public String toString() {
        return "MessageDTO{" +
                "receiverId=" + receiverId +
                ", taskId=" + taskId +
                ", content='" + content + '\'' +
                '}';
    }
}